{include file='header.tpl'}
<form method="post" action="{geturl action='edit'}?id={$fp->article->getId()}">
{if $fp->hasError()}
    <div class="error">
        下面有错误，请检查后再次提交。
    </div>
{/if}

<fieldset>
<legend>文章编辑</legend>
<div class="row" id="form_title_container">
    <label for="form_title">标题</label>
    <span><input type="text" id="form_title" name="subject" value="{$fp->subject|escape}" /></span>
    {include file='lib/error.tpl' error=$fp->getError('subject')}
</div>
<div class="row">
    <label for="form_content">内容</label>
    <span>{wysiwyg name='content' value=$fp->content}</span>
    {include file='lib/error.tpl' error=$fp->getError('content')}
</div>
<div>
    {if $fp->article->isLive()}
        {assign var='label' value='保存'}
    {elseif $fp->article->isSaved()}
        {assign var='label' value='保存并发表'}
    {else}
        {assign var='label' value='创建并发表'}
    {/if}
    <input class="submit"type="submit" value="{$label|escape}" />
    {if !$fp->article->isLive()}
        <input class="submit" type="submit" name="preview" value="预览" />
    {/if}
</div>
</fieldset>
</form>
{include file='footer.tpl'}